"""
拼音工具类
"""
from pypinyin import lazy_pinyin


def chinese2pinyin(text):
    # lazy_pinyin ==》['cong', 'ming', 'de', 'xiao', 'tu', 'zi']
    # capitalize 首字母大写，后面小写
    words = [s.capitalize() for s in lazy_pinyin(text)]
    return ' '.join(words)


print(chinese2pinyin("河南省"))
